import { createStore } from 'vuex'
import { createVuexPersistedState } from 'vue-persistedstate'
import cart from './modules/cart'
import category from './modules/category'
import user from './modules/user'
export default createStore({
  plugins: [
    createVuexPersistedState({
      key: 'erabbit-shop-store',
      storage: window.localStorage,
      whiteList: ['user', 'cart'],
      blackList: ['category']
    })
  ],
  state: {},
  getters: {},
  mutations: {},
  actions: {},
  modules: {
    user,
    cart,
    category
  }
})
